﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace cmsni.Account.orders
{
    public partial class defaut : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void rgorder_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            GridDataItem item = e.Item as GridDataItem;
            if (e.CommandName == "InitInsert")
            {
                Response.Redirect("edit.aspx?id=0&mode=add");

            }

            if (e.CommandName == "Edit")
            {

                //Lets edit the active row 
                int selectedRowIndex = Convert.ToInt32(item["id"].Text);
                Response.Redirect("edit.aspx?id=" + selectedRowIndex);
            }
        }
    }
}
 